Skip to content

test: update test implementation to work well with typescript 6#1436

Merged
joker23 merged 1 commit into
mainfrom
skz/sdk-2193/typescript-6-esModuleInterop-changes
Jun 24, 2026
Merged

test: update test implementation to work well with typescript 6#1436
joker23 merged 1 commit into
mainfrom
skz/sdk-2193/typescript-6-esModuleInterop-changes

Conversation

@joker23

@joker23 joker23 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This PR will update the way that tests import modules. This is to make the syntax of this module compatible with typescript 6.

Specifically the issue that the current syntax runs into is detailed in https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#deprecated:---esmoduleinterop-false-and---allowsyntheticdefaultimports-false


Note

Low Risk
Test and TypeScript config-only changes with no production code paths modified.

Overview
Prepares multiple SDK packages for TypeScript 6 by turning on esModuleInterop in their tsconfig.json files (alongside existing allowSyntheticDefaultImports).

Test fixtures that used namespace JSON imports (import * as … from '…json') now use default imports (import … from '…json'), matching the interop model TypeScript 6 expects. Affected areas include edge SDK tests (Akamai, Cloudflare, Fastly, Vercel, Shopify Oxygen), shared sdk-client / akamai-edgeworker-sdk / sdk-server-edge tests, and a formatting-only update to packages/sdk/fastly/jest.config.json.

No runtime or library src changes—only compiler settings and test import style.

Reviewed by Cursor Bugbot for commit 04e817d. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6-esModuleInterop-changes branch from 0f187c2 to 73ce3d2 Compare June 9, 2026 16:05
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@joker23

joker23 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 73ce3d2. Configure here.

@joker23 joker23 marked this pull request as ready for review June 9, 2026 16:18
@joker23 joker23 requested a review from a team as a code owner June 9, 2026 16:18

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6-esModuleInterop-changes branch 2 times, most recently from d2160b2 to 5010b22 Compare June 22, 2026 22:11

@kinyoklion kinyoklion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do any of these affected packages import the package.json?

I've seen problems combining esModuleInterop with a commonjs target with loading the package.json.

@joker23

joker23 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Do any of these affected packages import the package.json?

I've seen problems combining esModuleInterop with a commonjs target with loading the package.json.

Did a sweep and it looks like some packages do import package.json (browser, akamai, and vercel) but only in their test code. The reason, I think, they are not affected is that the package.json is imported with require(...) syntax which is not affected by esModuleInterop.

@joker23 joker23 force-pushed the skz/sdk-2193/typescript-6-esModuleInterop-changes branch from 5010b22 to 04e817d Compare June 24, 2026 14:16
@joker23 joker23 merged commit 3b1ce1e into main Jun 24, 2026
55 checks passed
@joker23 joker23 deleted the skz/sdk-2193/typescript-6-esModuleInterop-changes branch June 24, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants